package top.jfunc.network.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @author xiongshiyan at 2019/5/7 , contact me with email yanshixiong@126.com or phone 15208384257
 */
@RestController
@RequestMapping("/put")
public class PutController extends BaseController{
    private static final Logger logger = LoggerFactory.getLogger(PutController.class);

    @PutMapping("body")
    public String putBody(@RequestBody String body , HttpServletRequest httpServletRequest){
        printQueryString(logger , httpServletRequest);

        printParams(logger , httpServletRequest);

        printHeaders(logger , httpServletRequest);

        printBody(logger , body);

        return body;
    }
}
